package Game;
/**
 * Ration.java
 * 
 * The values in this enumerated type represent the different 
 * ration levels a player can choose when moving the party
 * 
 * 
 * @author Ray DeCuir 
 * @version 1.0
 *
 */
public enum Ration {

	// the different ration levels
	FILLING(1.5),
	MODERATE(1.0),
	SPARSE(.5),
	NONE(0.0);
	
	// Last known Ration selected by the player
	private static Ration playerRation;
	
	// The standard character consumption value
	private static int consumptionLevel = 4;
	
	// a double that holds the multiplier associated with the Ration, for example, a multi of 1 means 
	// that twice as much ration is consumed as when the multiplier is 0.5
	private double multi;

	/**
	 * Enumerated type constructor for the Ration type, sets the initial multi level
	 * 
	 * @param multi The original Ration multiplier
	 */
	private Ration( double multi)
	{
		this.multi = multi;
	}
	
	/**
	 * getPlayerRation
	 * 
	 * This method returns the most recently selected player ration
	 * 
	 * @return The most recent Ration selected by the player
	 */
	public static Ration getPlayerRation() {
		return playerRation;
	}

	
	/**
	 * setPlayerRation
	 * 
	 * This method updates the current player ration
	 * 
	 * @param playerRation The new value for the player Ration
	 */
	public static void setPlayerRation(Ration playerRation) {
		Ration.playerRation = playerRation;
	}

	/**
	 * Returns the Ration multiplier associated with each ration level, this multiplier is used
	 * when computing the amount of food consumed each turn
	 * 
	 * @return the multi
	 */
	public double getMulti() {
		return multi;
	}

	/**
	 * @return the consumptionLevel
	 */
	public static int getConsumptionLevel() {
		return consumptionLevel;
	}
}
